#include "app_message.h"
#include "log/log.h"
#include <stdlib.h>

int main(int argc, char const *argv[])
{
    char *json = "{\"conn_type\":1,\"id\":\"5858\",\"msg\":\"61626364\"}";
    char chars_buf[10];
    int len = app_message_jsonToChars(json,chars_buf,sizeof(chars_buf));  
    log_debug("生成字符数组消息:%.*s,len=%d",len,chars_buf,len);
    char *json2 = app_message_charsToJson(chars_buf,len);
    log_debug("解析json消息:%s",json2);

    free(json2);

    return 0;
}

